import java.text.DecimalFormat;
import java.util.*;

public class DateTask extends TimerTask {
    public void run() {
    	DecimalFormat df = new DecimalFormat("##.00");
    	double down_rate = Double.parseDouble(df.format((double)((double)HW2.down_bytesread_sec/1024)));
    	double up_rate = Double.parseDouble(df.format((double)((double)HW2.up_bytesread_sec/1024)));
    	
    	
    	HW2.down_rateLabel.setText(down_rate+"KB/s");				//download
        //HW2.down_bytesread_sec=0;
    	HW2.down_pnum.setText(HW2.down_num+" packets");
    	HW2.up_pnum.setText(HW2.up_num+" packets");
    	//HW2.sum_num2.setText(HW2.sum_numa+" packets");
        
    }
}